/*include:js\timerShow*/
var User=User||{};
fastCSharp.Copy(User,{
Load:function()
	{
	var SkinValue=fastCSharp.PageView.SkinValue.SkinValue;
	if(SkinValue.user.Id==(SkinValue.currentUser?SkinValue.currentUser.Id:-1))
		{
		if(!this.ShowFlag)	this.ShowFlag=fastCSharp.Cookie.ReadJson('oj_show')||[];
		for(var Index=this.ShowFlag.length;Index;)
			{
			var Flag=this.ShowFlag[--Index];
			if(Flag){
				if(Flag&1)	this.SetShow(Index,'IsTitle',1,1);
				if(Flag&2)	this.SetShow(Index,'IsHide',1,1);
				}
			}
		}
	},
SetShow:function(GroupId,Name,Value,IsCookie)
	{
	var SkinValue=fastCSharp.PageView.SkinValue.SkinValue;
	var Index=SkinValue.groups.IndexOf(function(Value){return Value.Group.Id==GroupId;},1);
	if(Name=='IsHide')
			{
			var TimerShow=fastCSharp.GetTimerShow('group'+GroupId);
			if(Value)	TimerShow.Hide(fastCSharp.ThisFunction(this,this.OnHide,[Index,1]));
			else	{
				fastCSharp.PageView.SkinValue.groups[Index].IsHide.Set(0);
				TimerShow.Show(fastCSharp.ThisFunction(this,this.OnHide,[Index,0]));
				}
			}
	else	fastCSharp.PageView.SkinValue.groups[Index][Name].Set(Value);
	if(!IsCookie&&SkinValue.user.Id==(SkinValue.currentUser?SkinValue.currentUser.Id:-1))
		{
		var Flag=this.ShowFlag[GroupId]||0;
		if(Name=='IsTitle')	Flag=((Flag|1)-1)|Value;
		else if(Name=='IsHide')	Flag=((Flag|2)-2)|(Value<<1);
		this.ShowFlag[GroupId]=Flag;
		fastCSharp.Cookie.Write({Name:'oj_show',Value:fastCSharp.ToJson(this.ShowFlag),Expires:(new Date).AddDays(365)});
		}
	},
OnHide:function(Index,Value)
	{
	fastCSharp.PageView.SkinValue.groups[Index].IsHide.Set(Value);
	}
		});
fastCSharp.OnLoad(User.Load,User);